package com.mdd.common.enums;

/**
 * 商户枚举类
 */
public enum PushInfoEnum {
    // 商户状态
    STATUS_CANCEL(0,"停用"),
    STATUS_COMPLETED(1,"启用"),
    STATUS_WAIT_REVIEW(2,"待审核"),
    STATUS_WAIT_REVIEW_NO(3,"审核拒绝"),
    STATUS_WAIT_PAY(4,"待支付");

    /**
     * 构造方法
     */
    private final int code;
    private final String msg;

    PushInfoEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 获取状态码
     *
     * @author fzr
     * @return Long
     */
    public int getCode() {
        return this.code;
    }

    /**
     * 获取提示
     *
     * @author fzr
     * @return String
     */
    public String getMsg() {
        return this.msg;
    }


    public static String getMsgByCode(Integer code) {
        for (PushInfoEnum enumItem : PushInfoEnum.values()) {
            if (enumItem.getCode() == code) {
                return enumItem.getMsg();
            }
        }
        return "未知";
    }

}
